﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ImaginaryDevelopmentMvc3.App
{
    public static class Extensions
    {
        public static bool IsNotNullOrEmpty(this string text)
        {
            return string.IsNullOrEmpty(text) == false;
        }
        public static bool IsNullOrEmpty(this string text)
        {
            return string.IsNullOrEmpty(text);
        }
        public static HttpContextWrapper ToMvcContext(this HttpContext context)
        {
            return new HttpContextWrapper(context);
        }
        public static string Aggregate(this IEnumerable<string> list,string delimiter)
        {
            return list.Aggregate((s1, s2) => s1 + delimiter + s2);
        }
    }
}